package com.itheima.inner.test2;

public class Test {
    public static void main(String[] args) {
        A a = new A();
        //a.i
        a.setI(20);
        System.out.println(a.getI());
       // a.new B();
        a.playB();
    }

}
class A {
    private int i=10;
    public void sing(){
        System.out.println("sing");
    }
    private class B{
        int j=20;
        public void dance(){
            System.out.println(i);
            System.out.println("dance");
        }

    }
    public void playB(){
        //创建b 的对象  使用b的成员
        B b = new B();
        System.out.println(b.j);
        b.dance();
    }

    public int getI() {
        return i;
    }

    public void setI(int i) {
        this.i = i;
    }


}
